package com.dfbz.demo;

/**
 * @author lscl
 * @version 1.0
 * @intro:
 */
public class Student {

    // 被所有的对象共享
    static int numberId;

    int sid;
    String name;
    int age;

    public Student(int sid, String name, int age) {
        numberId++;
        this.sid = sid;
        this.name = name;
        this.age = age;
    }

    public void show() {
        System.out.println("大家好，" +
                "我叫【" + name + "】，" +
                "年龄【" + age + "】，" +
                "学号【" + sid + "】，" +
                "序号【" + numberId + "】"
        );
    }

    public Student() {
    }



    public int getSid() {
        return sid;
    }

    public void setSid(int sid) {
        this.sid = sid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
